package com.nursinghome.user.controller;

import com.nursinghome.bean.RespBean;
import com.nursinghome.common.service.GoodsService;
import com.nursinghome.exception.NurisingHomeException;
import com.nursinghome.user.service.UserAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@CrossOrigin
@RestController
@RequestMapping("/user/dishes")
public class UserDishesController {
    @Autowired
    private UserAccountService userAccountService;
    @Autowired
    private GoodsService goodsService;

    @PutMapping("/{aid}")
    public RespBean updateAccountElderly(@PathVariable("aid") Long aid) throws NurisingHomeException {
        userAccountService.updateAccountElderly(aid);

        return RespBean.ok("支付成功");
    }
    @GetMapping("/byaid")
    public RespBean selectByAidByUser(Long aid){

        return null;
    }
}
